feat: MCP bridge + settings UI — unified capability types (Phase 1+2) - #471
Merged
Conversation
- Remove duplicate capabilities/types.rs and capabilities/registry.rs - Import RiskLevel, SourceKind, CapabilityHandler, Capability, CapabilityRegistry from data-studio-agent instead - Replace SourceKind::DocKit with SourceKind::AppLocal - Update init_registry() call to pass registration function array - Update agent/executor.rs and agent_adapters.rs to use data-studio-agent paths
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #471 +/- ##
==========================================
- Coverage 52.37% 51.92% -0.45%
==========================================
Files 115 114 -1
Lines 14548 14928 +380
Branches 865 865
==========================================
+ Hits 7619 7752 +133
- Misses 6670 6917 +247
Partials 259 259
🚀 New features to boost your workflow:
|
Introduces an embedded HTTP bridge (axum) that exposes the capability system over HTTP for the external data-studio-mcp TypeScript server. Endpoints: POST /tools — list all agent-tagged capabilities POST /invoke — execute a capability by name with connection resolution GET /health — health check Port auto-fallback via portpicker. Config and port file stored in app_data_dir. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Integrates the MCP bridge into the app lifecycle: - Initialize McpServerHandle as managed Tauri state - Read mcp-config.json and auto-start bridge in setup hook - Register get_mcp_status and save_mcp_config Tauri commands Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
New settings tab in the Settings dialog with: - Status indicator (running/stopped with port number) - Port input with restart button - Auto-start toggle switch Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
English and Simplified Chinese translations for the new MCP Bridge settings section. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Security: reject Elevated/Destructive capabilities on bridge (403) - Lifecycle: save_mcp_config now stops server when autoStart=false - Stale port file: liveness-test (TCP connect) before reporting running - Write port file BEFORE spawning server to avoid orphaned task - app_version: use real version from package_info() - McpConfig::load: log warning on corrupt/parse error - TOCTOU: remove port_available check, bind directly with fallback Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…payloads (18 tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 + Phase 2 of the unified Data Studio MCP architecture: migrate capability types to
data-studio-agent, add an axum-based HTTP bridge, and ship the MCP Bridge settings UI.Phase 1 — Unified capability types
types.rs+registry.rsfrom dockit, imports now fromdata_studio_agent::capabilitiesSourceKind::DocKit->AppLocalPhase 2 — HTTP bridge (
mcp_bridge.rs)POST /tools— lists Safe capabilities as OpenAI-compatible tool definitions + connectionsPOST /invoke— executes a capability with connection resolution + SSH tunnel support; rejects Elevated/Destructive (403)GET /health— app version + actual portmcp-port) for zero-config discovery by the MCP server{app_data_dir}/mcp-config.json(separate from.store.dat)McpServerHandleTauri managed state with graceful shutdown/restartget_mcp_status,save_mcp_configMCP Bridge settings UI
mcp-bridge.vue)Fixes included
Verification
cargo check— cleannpx tsc --noEmit— cleannpm run lint:check— cleanPart of geek-fun/data-studio-agent#9 (Phase 1, Phase 2, MCP UI). Companion PR: geek-fun/sqlkit#127.